package com.bawei.mvvm.viewmodel;

import com.bawei.mvvm.entity.ApiResponse;
import com.bawei.mvvm.entity.Goods;
import com.bawei.mvvm.respository.MainRepository;

import java.util.List;



import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

//viewModel：view和model交互

public class MainViewModel extends ViewModel {
    private MainRepository mMainRepository;//仓库


    public LiveData<ApiResponse<List<Goods>>> goods(int category_id, int currentPage, int pageSize){
       return mMainRepository.goods(category_id, currentPage, pageSize);
    }
}
